package com.springstudy.mapper;


import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author Tamako
 * @since 2025/1/13 09:51
 */
public interface AccountMapper {
    //+钱
    @Update("update tb_account set money=money+#{money} where account_name=#{accountName}")
    void incrMoney(@Param("accountName") String accountName, @Param("money") Integer money);

    //-钱
    @Update("update tb_account set money=money-#{money} where account_name=#{accountName}")
    void decrMoney(@Param("accountName") String accountName, @Param("money") Integer money);
}
